package com.admin.fen;

import com.usian.model.atri.pojos.ApArticle;
import com.usian.model.atri.pojos.ApArticleConfig;
import com.usian.model.atri.pojos.ApArticleContent;
import com.usian.model.common.dtos.ResponseResult;
import com.usian.model.user.pojos.ApAuthor;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;

@FeignClient("leadnews-article")
public interface Articlesfen {
//    /article/api/v1 /findById/{id}
    @PostMapping("/article/api/v1/findById/{id}")
    public ApAuthor findById(@PathVariable("id") Integer id);


    @PostMapping("/article/api/v1/saveArticle")
    public ApArticle saveArticle(@RequestBody ApArticle apArticle);

    @PostMapping("/article/api/v1/article_config/save")
    public ResponseResult saveArticleConfig(@RequestBody ApArticleConfig apArticleConfig);

    @PostMapping("/article/api/v1/article_content/save")
    public ResponseResult saveArticleContent(@RequestBody ApArticleContent apArticleContent);

    @GetMapping("/article/api/v1/findByIdapauthor")
    ApAuthor findByIdapauthor(@RequestParam Integer id);

    @PostMapping("/article/api/v1/article_config/update")
    void updateconfig(@RequestBody HashMap hashMap);
}
